package com.lottery.material.service.portal.circle.impl;

import com.lottery.material.dao.base.BaseDao;
import com.lottery.material.dao.portal.circle.CircleInfoDao;
import com.lottery.material.dao.portal.circle.CircleMemberInfoDao;
import com.lottery.material.entity.circle.CircleInfo;
import com.lottery.material.entity.circle.CircleMemberInfo;
import com.lottery.material.service.base.impl.BaseServiceImpl;
import com.lottery.material.service.portal.circle.CircleInfoService;
import com.lottery.material.service.portal.circle.CircleMemberInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author:houjie
 * @Description: 圈成员接口实现类
 * @Date:Create in 2019/4/9 15:17
 */
@Service
@Slf4j
public class CircleMemberInfoServiceImpl extends BaseServiceImpl<CircleMemberInfo, Integer> implements CircleMemberInfoService {

    @Autowired
    private CircleMemberInfoDao circleMemberInfoDao;

    @Override
    public BaseDao<CircleMemberInfo, Integer> getBaseDao() {
        return circleMemberInfoDao;
    }

    /**
    * @Author: houjie
    * @Description: 根据用户userId及圈子id获取圈成员信息
    * @Date: 2019/4/9 15:58
    */
    @Override
    public CircleMemberInfo findByUserIdAndCircleId(String userId, String circleId) {
        return circleMemberInfoDao.findByUserIdAndCircleId(userId,Integer.valueOf(circleId));
    }
}
